<?php

namespace app\controller\front;

use app\BaseController;
use think\facade\Config;
use EasyDingTalk\Application;

class Ding extends BaseController
{

    public function test()
    {

    	// 如果出现异常，https://www.cnblogs.com/greycdoer0/p/12206350.html

    	$appKey = Config::get('dingding.appKey');
    	$appSecret = Config::get('dingding.appSecret');
    	$corpId = Config::get('dingding.corpId');

		$config = [
		    'corp_id' => $corpId,
		    'app_key' => $appKey,
		    'app_secret' => $appSecret,
		];

		$app = new Application($config);

		$user = $app->user->get("0103670630688284", $lang = null);

		echo '<pre>';
		var_dump($user);
		exit;

    }


}